import os
import sys

## Append the ESAPI module dir to the path
ESAPI_MODULE_DIR = "owasp-esapi-python"
sys.path.append( os.path.join(os.getcwd(), ESAPI_MODULE_DIR) )


from routing import map

from google.appengine.ext.webapp.util import run_wsgi_app
from wsgi import WSGIApplication
from routes.middleware import RoutesMiddleware

app = WSGIApplication(map, debug = True)
app = RoutesMiddleware(app, map)

def main():
    run_wsgi_app(app)

if __name__ == "__main__":
    main()
